package com.duapk.search.conf;

import org.slf4j.LoggerFactory;

import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.joran.JoranConfigurator;
import ch.qos.logback.core.joran.spi.JoranException;

/**
 * 日志配置接口
 * 
 * @Package: com.duapk.index.conf
 * @ClassName: LogConfig
 * @author: jiangzheng
 * @date: Mar 25, 2011 9:33:11 AM
 * 
 */
public class LogConfig {
	public static void config(String configFilePath) {
		LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
		JoranConfigurator configurator = new JoranConfigurator();
		configurator.setContext(lc);
		lc.reset();
		try {
			configurator.doConfigure(configFilePath);
		} catch (JoranException e) {
			System.out.println("Fatal: Init LogConfig Error!!!");
			System.exit(1);
		}
	}

}
